package com.kc.common.enums;

import lombok.Getter;

/**
 * @author TP
 * @date 2021-01-30 18:02
 */
@Getter
public enum AppOsTypeEnum {

    IOS(1, "IOS"),
    ANDROID(2, "安卓");

    private Integer value;
    private String desc;

    AppOsTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static boolean contains(Integer osType) {
        AppOsTypeEnum[] osTypeEnums = AppOsTypeEnum.values();
        for (AppOsTypeEnum osTypeEnum : osTypeEnums) {
            if (osTypeEnum.getValue().equals(osType)) {
                return true;
            }
        }
        return false;
    }
}
